package gamemngr;

import java.io.Serializable;

import houserules.HouseRuleInterface;
import logic.moves.GameMove;

public class Rules implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private GameMngr game;
	
	public Rules(GameMngr game){
		this.game = game;
	}
	
	public boolean isLegal(GameMove move){
		for(HouseRuleInterface rule : game.getHouseRules()){
			if(!rule.isLegal(move)){
				return false;
			}
		}
		return true;
	}
}
